package com.powernobug.service.impl;

import com.github.pagehelper.PageHelper;
import com.powernobug.bean.model.MarketCategory;
import com.powernobug.bean.vo.BaseRespVo;
import com.powernobug.mapper.MarketCategoryMapper;
import com.powernobug.service.AdminCategoryService;
import com.powernobug.util.MyBatisUtil;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

/**
 * @description:
 * @project: project1-no-bug
 * @package: com.powernobug.service.Impl
 * @author: HuangWeiLong
 * @date: 2024/8/25 16:08
 */
public class AdminCategoryServiceImpl implements AdminCategoryService {
    @Override
    public BaseRespVo list() {
        SqlSession sqlSession = MyBatisUtil.getSqlSession(true);
        MarketCategoryMapper mapper = sqlSession.getMapper(MarketCategoryMapper.class);

        List<MarketCategory> marketCategories = mapper.selectAllByConditions();
        return BaseRespVo.ok(marketCategories);
    }
}
